package com.crocodileq.config;


import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/***
 * @Author 鳄鱼杆
 * @Date 2025/9/13 15:36
 */
@Configuration
public class RedisConfig {

    @Value("${redis.password}")
    private static String DEFAULT_PASSWORD ;

    @Bean
    public RedissonClient redissonClient(){

        Config config = new Config();
        config.useSingleServer()
                .setAddress("redis://192.168.203.132:6379")
                .setPassword(DEFAULT_PASSWORD);
        return Redisson.create(config);
    }
}
